package com.hmdp.utils;

/**
 * @author 衷岚
 * @version 1.0
 */
public interface ILock {

    /**
     * 尝试获取锁
     * @param timeoutSec  锁的ttl
     * @return  true-获取成功，false-获取失败
     */
    boolean tryLock(long timeoutSec);

    void unlock();
}
